package com.zhuqi.wx.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.zhuqi.common.constans.ResponseResultEnum;
import com.zhuqi.common.vo.BaseResultVo;

/**
 * @author : ZhuQi
 * @version : 时间:2021/12/7 14:03 版本:
 * @description : 微信支付回掉通知公共返回对象
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WxPayOrderNotifyResultVo extends BaseResultVo {

    public WxPayOrderNotifyResultVo() {
    }

    public WxPayOrderNotifyResultVo success() {
        this.code = ResponseResultEnum.SUCCESS.getCode();
        this.info = ResponseResultEnum.SUCCESS.getInfo();
        return this;
    }

    public WxPayOrderNotifyResultVo success(Object data) {
        this.code = ResponseResultEnum.SUCCESS.getCode();
        this.info = ResponseResultEnum.SUCCESS.getInfo();
        this.data = data;
        return this;
    }

    public WxPayOrderNotifyResultVo fail() {
        this.code = ResponseResultEnum.FAIL.getCode();
        this.info = ResponseResultEnum.FAIL.getInfo();
        return this;
    }

    public WxPayOrderNotifyResultVo fail(Object data) {
        this.code = ResponseResultEnum.FAIL.getCode();
        this.info = ResponseResultEnum.FAIL.getInfo();
        this.data = data;
        return this;
    }
}
